<template>
    <!--测评协议-->
    <div>
        <headers></headers>
        <div class="xieyi padding88">
            <div class="auto">
                <div class="titleWrap clearfix">
                    <p class="titleName">{{title}}</p>
                    <a href="javascript:;" class="pull-right" @click="back()">返回</a>
                </div>
                <div v-html="html" style=" text-align: left" class="font14"></div>
            </div>
        </div>
        <footers></footers>
    </div>

</template>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less" rel="stylesheet/less">
    .xieyi {
        background-color: #f5f5f5;
        padding: 140px 0 315px;
    }

    .auto {
        background-color: #fff;
        padding: 0 20px 20px;
        line-height: 30px;
        font-size: 14px;
    }

    .titleWrap {
        height: 50px;
        font-size: 16px;
        padding: 20px 20px 20px 0;
        text-align: justify-all;
        border-bottom: 1px solid #E1E1E1;
        margin-bottom: 20px;
        color: #957960;

        .titleName {
            float: left;
            line-height: 24px;
            border-bottom: 3px solid #957960;
            padding-bottom: 3px;
        }

        a {
            font-size: 14px;
            color: #957960;
        }
    }
</style>
<script type="text/ecmascript-6">
    import headers from '../template/header'
    import footers from '../template/footer'
    import {getHtmlWeb} from "../../http";

    export default {
        name: 'xieyicommon',
        props: {},
        data() {
            return {
                typeCode: this.$route.query.typeCode,
                title: '',
                html: '',    //页面协议内容
                backUrl: this.$route.query.backUrl
            };
        },
        methods: {
            back() {
                /*this.$router.push({
                    name: this.backUrl,
                })*/
                history.go(-1)
            }
        },
        created() {
            //获取协议
            getHtmlWeb({type: this.typeCode}).then(res => {
                this.html = res.data.html.htmlContent;
                this.title = res.data.html.htmlTitle;
            })
        },
        components: {
            headers,
            footers
        }
    }
</script>
